﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FaultDiagnosisSystem.BLL
{
    
    /// <summary>
    /// 处理实时故障数据每日分析业务类
    /// </summary>
    public class RealTimeFaultDataDaily
    {
        DAL.RealTimeFaultDataDaily dal = new DAL.RealTimeFaultDataDaily();

        /// <summary>
        /// 获取实时故障每日分析数据的最新日期,无数据则返回默认时间
        /// </summary>
        /// <returns></returns>
        public DateTime GetLastDay()
        {
            return dal.GetLastDay();
        }

        /// <summary>
        /// 获取指定日期的RealTimeFaultDataDailyViewModel集合
        /// </summary>
        /// <param name="day"></param>
        /// <returns></returns>
        public IList<Models.ViewModels.RealTimeFaultDataDailyViewModel> GetList(DateTime day)
        {
            return dal.GetList(day);
        }

        internal IList<Models.ViewModels.RealTimeFaultDataDailyViewModel> GetListOfLastDay()
        {
            return dal.GetListOfLastDay();
        }
    }
}